/*
 * Copyright 2010-2013 MaMuN
 * 
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 * 
 *     http://www.apache.org/licenses/LICENSE-2.0
 * 
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package main.java.net.bornil.db.service;

import main.java.net.bornil.db.entity.admin.User;

/**
 * @author MaMuN
 * @since Sep 22, 2012
 */
public interface UserDao {

    /**
     * Creates a new user
     * 
     * @param user
     * @return 0 if success, otherwise a positive integer.
     */
    public int createUser(User user);

    /**
     * Fetches the details of a user identified by the user id.
     * 
     * @param userId
     *            User ID to be searched
     * 
     * @return User details if a user is available with the ID, blank User
     *         object otherwise.
     */
    public User getUser(String userId);
}
